<template>
  <div>
    <el-card>
      <div slot="header" class="clearfix text-left">
        <el-col :span="23">
          <span class="title-icon">获取DHL追踪号</span>
        </el-col>
      </div>
      <el-row style="margin-top: 30px;margin-bottom: 30px">
        <el-col :span="1">
          <span>运单号:</span>
        </el-col>
        <el-col :span="6">
          <el-input size="large" :rows="5" v-model="waybillNos" type="textarea"  placeholder="请输入运单号(德国),多个换行隔开"></el-input>
        </el-col>
        <el-col :span="4" style="margin-left: 10px;">
          <el-button size="mini" type="primary" @click="trackPrintlabelDhl">获取DHL追踪号</el-button>
        </el-col>
      </el-row>

    </el-card>
  </div>
</template>
<script>
  import { ajax } from "@/store/yg/common/utils";
  import axios from "axios";
  import * as constant from "@/store/yg/common/constant";

  export default {
    components: {},
    props: [],
    data() {
      return {
        waybillNos: '',
      };
    },
    computed: {},
    watch: {},
    created() {},
    mounted() {
    },
    methods: {
      trackPrintlabelDhl(){
        if (!this.waybillNos){
          this.$message.error("请输入运单号")
        }
        ajax("trackPrintlabelDhl", {waybillNos:this.waybillNos}).then(
          res => {
            console.log(res);
            if (res.code == 200) {
              this.$message.success("获取成功！")
            }else{
              this.$message.error("获取失败，" + res.data);
            }
          },
          error => {
            console.log(error);
          }
        );
      },



    },
  };
</script>
<style>
</style>
